<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
<style>
    #div {
        width: 500px;
        height: 300px;
        background-color: green
    }
    #span {
        width: 300px;
        height: 400px;
        background-color: pink
    }
</style>
<body>
    <div id="box">
        <a :href="url" @click.prevent>百度一下</a>
        <div id="div" @click="div">
            <div id="span" @click.stop="span"></div>
        </div>
    </div>
    <script>
        const v_c = new Vue({
            el: '#box',
            data: {
                url: 'http://baidu.com'
            },
            methods: {
                div() {
                    console.log('是div')
                },
                span() {
                    console.log('是span')
                }
            }
        })
    </script>
</body>

</html>